package responsibilitychain;

/**
 * 副校长
 * @author Fengdong.Duan
 * @create 2023/12/5 15:02
 */
public class ViceChancellor extends Approver {
    public ViceChancellor() {
        super("副校长");
    }

    @Override
    void handleRequest(PurchaseRequest request) {
        if (request.getAmount() <= 30000) {
            System.out.println("Purchase request for " + request.getItemName() + " approved by " + name + " apply for " + request.getAmount());
        } else if (next != null) {
            next.handleRequest(request);
        }
    }
}
